/* 
    path.resolve()  方法将路径或路径片段的序列解析为绝对路径
    path.sep()      获取操作系统路径分隔符
    path.parse()    解析路径并返回相关路径对象信息
*/

const fs = require("fs");
const path = require("path");

let str = __dirname + "/index.html";
// const dirName = path.join(str);
const dirName = path.resolve(__dirname, "/index", "a");
// console.log(dirName);

// sep 获取操作系统路径分隔符
console.log(path.sep, "sep");

// parse 解析路径并返回相关路径对象信息
// console.log(__filename);
let filenamePath = "D:workSpace\nodejsSggNoejsBaseVideopath\1-path模块.js";
console.log(path.parse(filenamePath));

console.log(path.basename(filenamePath));
